package cn.pn.project.service;

import cn.pn.project.common.RedisUtils;
import cn.pn.project.mapper.schedule.PlaceDao;
import cn.pn.project.pojo.schedule.Place;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

@RestController
public class PlaceService {

    @Autowired
    private PlaceDao placeDao;


    /**
     * 根据场地id查询场地信息
     * @param placeId
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "/getPlaceByPlaceId")
    public Place getPlaceByPlaceId(@RequestParam("placeId")Integer placeId) throws SQLException{
        return placeDao.getPlaceByPlaceId(placeId);
    }

}
